<template>
  <el-row class="ClientBox">
    <el-row class="ClientBg">
      <el-row class="ClientContent">
        <h3 class="ClientTitle">工程预算书 <span class="icon">></span></h3>
        <el-row>
          <el-col :span="21">
            <el-button size="mini" type="primary">导入</el-button>
            <el-button size="mini" type="primary">保存</el-button>
            <el-button size="mini" type="primary" v-if="!editFlage">打印</el-button>
            <el-button size="mini" type="primary" v-if="!editFlage" @click="editFlage = true">编辑</el-button>
            <el-button size="mini" type="primary" v-if="editFlage" @click="editFlage = false">取消</el-button>
          </el-col>
          <el-col :span="3" >
            <el-button size="mini" class="signContract" v-if="!signContract" @click="signContract=true">签订合同</el-button>
            <span v-if="signContract">已签单</span>
          </el-col>

        </el-row>
        <el-row class="budgetBox">
            <h4 class="budgetTitle">工程预算书</h4>
            <el-row class="budgetContent">
              <el-col :span="8">
                <el-col>客户姓名：###</el-col>
                <el-col>工程地点：###</el-col>
                <el-col>居室户型：###</el-col>
              </el-col>
              <el-col :span="8">
                <el-col>联系电话：###</el-col>
                <el-col>设计师：###</el-col>
                <el-col>建筑面积：###</el-col>
              </el-col>
              <el-col :span="8">
                <el-col>金额总计：###</el-col>
                <el-col>工程等级：###</el-col>
                <el-col>预算员：###</el-col>
              </el-col>
            </el-row>
        </el-row>
        <el-row>
          <el-table :data="budgetTableData" border style="width: 100%">
            <el-table-column  prop="order" label="序号" width="80"></el-table-column>
            <el-table-column prop="userName" label="项目编号" width="120"></el-table-column>
            <el-table-column prop="userPhone" label="项目名称" width="120"></el-table-column>
            <el-table-column prop="userLayout" label="单位" width="120"></el-table-column>
            <el-table-column prop="userArea" label="单价(元)" width="120"></el-table-column>
            <el-table-column prop="userProcessAddress" label="数量" width="120"></el-table-column>
            <el-table-column prop="userProject" label="金额(元)" width="120"></el-table-column>
            <el-table-column prop="userTime" label="工艺做法及材料" width="120"></el-table-column>
            <el-table-column fixed="right" label="操作" width="200" v-if="editFlage" >
              <template slot-scope="scope">
                <!--<el-button type="text" size="small" @click="dialogVisible = true">编辑用户</el-button>-->
                <!--<router-link to="/main/editContract" class="text"><el-button type="text" size="small">编辑合同</el-button></router-link>-->
                <!--<el-button type="text" size="small">删除</el-button>-->
              </template>
            </el-table-column>
          </el-table>
        </el-row>
      </el-row>
    </el-row>
  </el-row>
</template>
<script>
  import ElCol from "element-ui/packages/col/src/col";

  export default {
    components: {ElCol},
    data() {
      return {
        editFlage:false,
        signContract:false,
        type:1,
        keyWords:'',
        budgetTableData:[{
          order:'',
          userName:'',
          userPhone: '',
          userArea: '',
          userProcessAddress: '',
          userProject: '',
          userTime: '',
          userSignStatus: '',
        }],
        EditUserInfoForm:{
          userName:''
        },
        dialogVisible: false,
      }
    },
    methods:{
      changeType(index){
        this.type=index
      },
      //"X关闭弹窗"
      handleClose(done) {
        this.$confirm('确认关闭？')
          .then(_ => {
            done();
          })
          .catch(_ => {});
      }
    }
  }

</script>

<style scoped>
  .ClientBox{
    padding: 100px 20px 10px 250px;
  }
  .ClientBg{
    background-color: white;
    box-shadow: 0 0 6px #e7e7e7;
  }
  .ClientContent{
    padding: 20px;
  }
  .ClientTitle{
    font-size: 12px;
    color: #ffa44c;
  }
  .icon{
    color: #777;
    margin-left: 5px;
    font-size: 15px;
  }
.budgetBox{
  border: 1px solid lightgrey;
  margin-top: 30px;
  height: auto;
}
  .budgetTitle{
    display: flex;
    justify-content: center;
    align-content: center;
  }
  .budgetContent{
    text-align: center;
    margin-bottom: 30px;
  }
  .budgetContent>div>div{
    margin-top: 10px;
  }
  .signContract{
    background-color: orange;
    color: white;
  }

</style>
